package com.example.takeaway.context;

import com.example.takeaway.model.bo.UserAccount;

/**
 * @author 邢晨旭
 * {@code @date} 2023/10/16
 */
public class UserInfoContext {

    private static final ThreadLocal<UserAccount> USER_NAME = new ThreadLocal<>();

    public static void set(UserAccount account) {
        USER_NAME.set(account);
    }

    public static UserAccount get() {
        return USER_NAME.get();
    }

    public static void remove() {
        USER_NAME.remove();
    }

}
